package com.best.oasis.settlement.web.action.system;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.stereotype.Service;

import com.best.oasis.settlement.common.entity.system.MenuItem;
import com.best.oasis.settlement.common.vo.system.MenuItemVO;
import com.best.oasis.settlement.service.system.MenuItemService;
import com.best.oasis.settlement.web.action.base.BaseActionImpl;
import com.best.oasis.util.tree.TreeNode;

/**
 * 菜单权限
 * @author bl00575
 *
 */
@RemotingDestination
@Service
public class MenuItemActionImpl extends BaseActionImpl<MenuItemVO, MenuItem> implements MenuItemAction {

	@Autowired
	private MenuItemService menuItemService;
	
	@Override
	public void afterConstruct() {
		super.setBaseService(menuItemService);
	}

	/**
	 * 获取菜单树
	 */
    public TreeNode getMenuItemTree() {
        return menuItemService.getMenuItemTree();
    }
    
    public List<MenuItemVO> getList(){
    	return menuItemService.getList();
    }
    
    public List<MenuItemVO> saveOnEdit(List<MenuItemVO> list){
    	return menuItemService.saveOnEdit(list);
    }
}
